{% extends "../base_adminlte.html" %}

{% block content %}
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
    <div class="content-header">
    </div>

  <section class="content">
      <form  action="{% url 'useradd' %}" method="post">
            <table style="border-collapse:separate; border-spacing: 0px 10px;
            margin-left: 400px;margin-top: 60px;align-content: center;">
                <tr style="height: 10px">
                    <td>用户名</td>
                    <td><input type="text" name="username"  >
                       <label>*必填项</label>
                  </td>
                </tr>
                <tr>
                    <td>密码</td>
                    <td><input type="password" name="password"  >
                       <label>*必填项</label>
                  </td>
                </tr>
                <tr>
                    <td>所属组</td>
                    <td>
                    <select id='group' name="group" class="form-control"  >
                              <option value="" >请选择所属组</option>
                                 {% for g in group %}
                                      <option value={{ g.name }}>
                                          {{  g.name }}
                                      </option>
                                  {% endfor %}
                         </select>
                  </td>
                      <td>*必填项</td>
                    </td>
                </tr>
                <tr>
                    <td>
                    <td ><input type="submit" value="新增用户" >
                    <button style="margin-left: 10%" onclick="location.href='/ansible/userlist/1'" type="button" value="取消" >取消</button></td>
               </tr>
            </table>
    </form>
  </section>
</div>

{% endblock %}
